<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>循环遍历list集合</title>
</head>
<body>
<!--
user:当前循环遍历的对象变量名称（随意）
userStat：当前循环对象状态的变量(可选，默认就是对象变量名称+Stat)
${userList}：当前循环的集合
-->
<div th:each="user,userStat:${userList}">
    <span th:text="${userStat.index}"></span>
    <span th:text="${userStat.count}"></span>
    <span th:text="${user.id}"></span>
    <span th:text="${user.nick}"></span>
    <span th:text="${user.phone}"></span>
    <span th:text="${user.address}"></span>
</div>

<br/>

<div th:each="user:${userList}">
    <span th:text="${userStat.index}"></span>
    <span th:text="${userStat.count}"></span>
    <span th:text="${user.id}"></span>
    <span th:text="${user.nick}"></span>
    <span th:text="${user.phone}"></span>
    <span th:text="${user.address}"></span>
</div>

<br/>

<h1 th:text="${data}">****</h1>
<div th:text="${data}">****</div>
<span th:text="${data}">*****</span><br/>

<input type="text" th:value="${data}"/>

</body>
</html>